<?php
namespace Admin\Controller;


class CategoryController extends CommonController
{
    private $category;

    public function __construct()
    {
        parent::__construct();
        $this->category = M('category');
    }

    public function index()
    {
        $Category = D('Category');
        $categories = $Category->relation(true)->where('parent_id=0')->order('sort_order')->select();

        $this->assign('categories', $categories);
        $this->display();
    }

    public function create()
    {
        $this->display();
    }

    function store()
    {

    }

}